<template>
  <!-- 使用container布局容器进行布局 -->
  <div class="common-layout">
    <el-container>
      <!-- 左侧导航栏 -->
      <CommonAside></CommonAside>

      <!-- 右侧容器 -->
      <el-container>
        <el-header>
          <CommonHeader></CommonHeader>
        </el-header>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
// 使用defineComponent能够更好的约束里面的一些数据让vue语法兼容ts.
import { defineComponent } from "vue";

import CommonHeader from "../components/CommonHeader.vue";
import CommonAside from "../components/CommonAside.vue"
export default defineComponent({
  components: {
    CommonHeader,
    CommonAside
  }
});
</script>

<style scoped lang="less">
.common-layout{
  height: 100%;
  & > .el-container{
    height: 100%;
    & > .el-aside{
      height: 100%;
      background: #545c64;
    }
  }
}
</style>